package com.yonyou.pmclouds.team.rmiitf;

import com.yonyou.pmclouds.basecom.entity.PageObject;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.project.entity.ProjectRefVO;
import com.yonyou.pmclouds.project.entity.ProjectSearchConditionVO;
import com.yonyou.pmclouds.project.entity.ProjectWithProblemVO;

import java.util.List;

/**
 * 项目参照，按照项目团队过滤
 */
public interface ProjectRefWithTeamQuery {
    /**
     * 根据项目团队查询某用户的项目
     */
    PageObject<ProjectRefVO> queryOfUser(String userId, String tenantid, Byte[] state, int start, int offset, String[] pkRoles) throws BusinessException;

    /**
     * 根据项目团队查询某用户的项目,包含项目经理和问题数
     */
    PageObject<ProjectWithProblemVO> queryOfUserProblem(String userId, String tenantid, Byte state, int start, int offset, String[] pkRoles, String[] pkOrgs) throws BusinessException;

    int checkProjectStatus(String userId, String tenantid, String projectid) throws BusinessException;

    /**
     * 根据项目团队查询某用户的项目（带距离）
     */
    PageObject<ProjectRefVO> queryProjectWithDistanceOfUser(String userId, String tenantid, Byte[] state, int start, int offset, String[] pkRoles,
                                                            double longitude, double latitude) throws BusinessException;

    ProjectWithProblemVO[] queryOfCondition(ProjectSearchConditionVO searchConditionVO) throws BusinessException;
    /**
     * 根据项目团队查询某用户的项目ID（带距离）
     */
     List<String> getPermissionProjects(String userId, String tenantid, Byte[] state, int start, int offset, String[] pkRoles);

    int STATUS_OK = 0;
    int PROJECT_END = 1;
    int PROJECT_NOT_EXIST = 2;

}
